import Vue from 'vue';
import App from './App.vue';
import router from './router';
import store from './store';
import './state/base.css';
//  icon
import './state/fonts/iconfont.css';
// 引入 element
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';

Vue.use(ElementUI);
Vue.config.productionTip = false;

router.afterEach((to, from, next) => {
  window.scrollTo(0, 0);
  // 或
  // window.scroll(0, 0);
});

new Vue({
  router,
  store,
  render: h => h(App),
}).$mount('#app');
